home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9725 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 62 6c | 61 63 6b 2e 77 65 65 67 |Path: bl|ack.weeg|
|00000010| 2e 75 69 6f 77 61 2e 65 | 64 75 21 72 6f 62 69 6e |.uiowa.e|du!robin|
|00000020| 73 6f 6e 0a 46 72 6f 6d | 3a 20 54 68 65 20 41 6d |son.From|: The Am|
|00000030| 6f 72 70 68 6f 75 73 20 | 4d 61 73 73 20 3c 72 6f |orphous |Mass <ro|
|00000040| 62 69 6e 73 6f 6e 40 62 | 6c 75 65 2e 77 65 65 67 |binson@b|lue.weeg|
|00000050| 2e 75 69 6f 77 61 2e 65 | 64 75 3e 0a 4e 65 77 73 |.uiowa.e|du>.News|
|00000060| 67 72 6f 75 70 73 3a 20 | 63 6f 6d 70 2e 6c 61 6e |groups: |comp.lan|
|00000070| 67 2e 63 0a 53 75 62 6a | 65 63 74 3a 20 52 65 3a |g.c.Subj|ect: Re:|
|00000080| 20 77 68 69 6c 65 20 6c | 6f 6f 70 20 70 72 6f 62 | while l|oop prob|
|00000090| 6c 65 6d 0a 44 61 74 65 | 3a 20 54 75 65 2c 20 31 |lem.Date|: Tue, 1|
|000000a0| 32 20 4d 61 72 20 31 39 | 39 36 20 31 37 3a 31 36 |2 Mar 19|96 17:16|
|000000b0| 3a 31 38 20 2d 30 36 30 | 30 0a 4f 72 67 61 6e 69 |:18 -060|0.Organi|
|000000c0| 7a 61 74 69 6f 6e 3a 20 | 55 6e 69 76 65 72 73 69 |zation: |Universi|
|000000d0| 74 79 20 6f 66 20 49 6f | 77 61 2c 20 49 6f 77 61 |ty of Io|wa, Iowa|
|000000e0| 20 43 69 74 79 2c 20 49 | 41 2c 20 55 53 41 0a 44 | City, I|A, USA.D|
|000000f0| 69 73 74 72 69 62 75 74 | 69 6f 6e 3a 20 77 6f 72 |istribut|ion: wor|
|00000100| 6c 64 0a 4d 65 73 73 61 | 67 65 2d 49 44 3a 20 3c |ld.Messa|ge-ID: <|
|00000110| 50 69 6e 65 2e 41 33 32 | 2e 33 2e 39 31 2e 39 36 |Pine.A32|.3.91.96|
|00000120| 30 33 31 32 31 37 31 32 | 35 38 2e 31 34 39 34 37 |03121712|58.14947|
|00000130| 37 43 2d 31 30 30 30 30 | 30 40 62 6c 61 63 6b 2e |7C-10000|0@black.|
|00000140| 77 65 65 67 2e 75 69 6f | 77 61 2e 65 64 75 3e 0a |weeg.uio|wa.edu>.|
|00000150| 52 65 66 65 72 65 6e 63 | 65 73 3a 20 3c 50 69 6e |Referenc|es: <Pin|
|00000160| 65 2e 4f 53 46 2e 33 2e | 39 31 2e 39 36 30 33 31 |e.OSF.3.|91.96031|
|00000170| 32 31 33 33 34 34 39 2e | 37 38 34 34 42 2d 31 30 |2133449.|7844B-10|
|00000180| 30 30 30 30 40 69 6f 2e | 55 57 69 6e 6e 69 70 65 |0000@io.|UWinnipe|
|00000190| 67 2e 63 61 3e 20 3c 44 | 6f 36 44 42 30 2e 45 74 |g.ca> <D|o6DB0.Et|
|000001a0| 45 40 6d 69 63 72 6f 75 | 6e 69 74 79 2e 63 6f 6d |E@microu|nity.com|
|000001b0| 3e 0a 4e 4e 54 50 2d 50 | 6f 73 74 69 6e 67 2d 48 |>.NNTP-P|osting-H|
|000001c0| 6f 73 74 3a 20 62 6c 61 | 63 6b 2e 77 65 65 67 2e |ost: bla|ck.weeg.|
|000001d0| 75 69 6f 77 61 2e 65 64 | 75 0a 4d 69 6d 65 2d 56 |uiowa.ed|u.Mime-V|
|000001e0| 65 72 73 69 6f 6e 3a 20 | 31 2e 30 0a 43 6f 6e 74 |ersion: |1.0.Cont|
|000001f0| 65 6e 74 2d 54 79 70 65 | 3a 20 54 45 58 54 2f 50 |ent-Type|: TEXT/P|
|00000200| 4c 41 49 4e 3b 20 63 68 | 61 72 73 65 74 3d 55 53 |LAIN; ch|arset=US|
|00000210| 2d 41 53 43 49 49 0a 58 | 2d 53 65 6e 64 65 72 3a |-ASCII.X|-Sender:|
|00000220| 20 72 6f 62 69 6e 73 6f | 6e 40 62 6c 61 63 6b 2e | robinso|n@black.|
|00000230| 77 65 65 67 2e 75 69 6f | 77 61 2e 65 64 75 0a 49 |weeg.uio|wa.edu.I|
|00000240| 6e 2d 52 65 70 6c 79 2d | 54 6f 3a 20 3c 44 6f 36 |n-Reply-|To: <Do6|
|00000250| 44 42 30 2e 45 74 45 40 | 6d 69 63 72 6f 75 6e 69 |DB0.EtE@|microuni|
|00000260| 74 79 2e 63 6f 6d 3e 20 | 0a 0a 4f 6e 20 54 75 65 |ty.com> |..On Tue|
|00000270| 2c 20 31 32 20 4d 61 72 | 20 31 39 39 36 2c 20 54 |, 12 Mar| 1996, T|
|00000280| 6f 6d 20 53 61 6e 64 65 | 72 73 20 77 72 6f 74 65 |om Sande|rs wrote|
|00000290| 3a 0a 0a 3e 20 42 69 6c | 6c 20 53 69 6d 70 73 6f |:..> Bil|l Simpso|
|000002a0| 6e 20 3c 77 73 69 6d 70 | 73 6f 6e 40 75 77 69 6e |n <wsimp|son@uwin|
|000002b0| 6e 69 70 65 67 2e 63 61 | 3e 20 77 72 69 74 65 73 |nipeg.ca|> writes|
|000002c0| 3a 0a 3e 20 7c 3e 20 43 | 6f 6e 73 69 64 65 72 20 |:.> |> C|onsider |
|000002d0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 6f |the foll|owing co|
|000002e0| 64 65 20 66 72 61 67 6d | 65 6e 74 3a 0a 3e 20 7c |de fragm|ent:.> ||
|000002f0| 3e 20 0a 3e 20 7c 3e 20 | 79 3d 32 30 30 30 3b 20 |> .> |> |y=2000; |
|00000300| 7a 3d 31 30 30 30 3b 0a | 3e 20 7c 3e 20 78 3d 30 |z=1000;.|> |> x=0|
|00000310| 3b 0a 3e 20 7c 3e 20 77 | 68 69 6c 65 28 78 3c 3d |;.> |> w|hile(x<=|
|00000320| 58 4d 41 58 29 0a 3e 20 | 7c 3e 20 09 7b 0a 3e 20 |XMAX).> ||> .{.> |
|00000330| 7c 3e 20 09 78 2b 3d 28 | 69 6e 74 29 20 65 72 61 ||> .x+=(|int) era|
|00000340| 6e 64 28 6d 65 61 6e 29 | 3b 0a 3e 20 7c 3e 20 09 |nd(mean)|;.> |> .|
|00000350| 73 65 74 64 6f 74 28 78 | 2c 79 2c 7a 29 3b 0a 3e |setdot(x|,y,z);.>|
|00000360| 20 7c 3e 20 09 7d 0a 3e | 20 7c 3e 20 09 0a 3e 20 | |> .}.>| |> ..> |
|00000370| 7c 3e 20 54 68 65 20 61 | 62 6f 76 65 20 63 6f 64 ||> The a|bove cod|
|00000380| 65 20 77 69 6c 6c 20 61 | 6c 73 6f 20 61 74 74 65 |e will a|lso atte|
|00000390| 6d 70 74 20 74 6f 20 70 | 6c 6f 74 20 6f 6e 65 20 |mpt to p|lot one |
|000003a0| 70 6f 69 6e 74 20 61 74 | 20 61 6e 20 78 20 76 61 |point at| an x va|
|000003b0| 6c 75 65 20 3e 58 4d 41 | 58 0a 3e 20 7c 3e 20 62 |lue >XMA|X.> |> b|
|000003c0| 65 66 6f 72 65 20 69 74 | 20 74 65 72 6d 69 6e 61 |efore it| termina|
|000003d0| 74 65 73 2e 0a 3e 20 7c | 3e 20 0a 3e 20 7c 3e 20 |tes..> ||> .> |> |
|000003e0| 49 73 20 74 68 65 72 65 | 20 61 20 6e 69 63 65 20 |Is there| a nice |
|000003f0| 77 61 79 20 74 6f 20 77 | 72 69 74 65 20 74 68 65 |way to w|rite the|
|00000400| 20 63 6f 64 65 20 73 6f | 20 69 74 20 77 6f 72 6b | code so| it work|
|00000410| 73 20 70 72 6f 70 65 72 | 6c 79 3f 0a 3e 20 0a 3e |s proper|ly?.> .>|
|00000420| 20 79 3d 32 30 30 30 3b | 20 7a 3d 31 30 30 30 3b | y=2000;| z=1000;|
|00000430| 0a 3e 20 78 3d 30 3b 0a | 3e 20 64 6f 20 20 7b 0a |.> x=0;.|> do {.|
|00000440| 3e 20 20 09 78 2b 3d 28 | 69 6e 74 29 20 65 72 61 |> .x+=(|int) era|
|00000450| 6e 64 28 6d 65 61 6e 29 | 3b 0a 3e 20 20 09 73 65 |nd(mean)|;.> .se|
|00000460| 74 64 6f 74 28 78 2c 79 | 2c 7a 29 3b 0a 3e 20 20 |tdot(x,y|,z);.> |
|00000470| 20 20 20 20 7d 20 77 68 | 69 6c 65 28 78 3c 3d 58 | } wh|ile(x<=X|
|00000480| 4d 41 58 29 0a 0a 20 20 | 54 68 69 73 20 68 61 73 |MAX).. |This has|
|00000490| 20 65 78 61 63 74 6c 79 | 20 74 68 65 20 73 61 6d | exactly| the sam|
|000004a0| 65 20 70 72 6f 62 6c 65 | 6d 20 61 73 20 74 68 65 |e proble|m as the|
|000004b0| 20 6f 72 69 67 69 6e 61 | 6c 20 6c 6f 6f 70 2c 20 | origina|l loop, |
|000004c0| 62 65 63 61 75 73 65 20 | 69 74 20 61 64 64 73 20 |because |it adds |
|000004d0| 0a 65 72 61 6e 64 28 29 | 20 74 6f 20 78 20 61 6e |.erand()| to x an|
|000004e0| 64 20 63 61 6c 6c 73 20 | 73 65 74 64 6f 74 28 29 |d calls |setdot()|
|000004f0| 20 5f 62 65 66 6f 72 65 | 5f 20 63 68 65 63 6b 69 | _before|_ checki|
|00000500| 6e 67 20 78 27 73 20 76 | 61 6c 75 65 20 61 67 61 |ng x's v|alue aga|
|00000510| 69 6e 73 74 20 58 4d 41 | 58 2e 20 20 0a 41 6c 73 |inst XMA|X. .Als|
|00000520| 6f 2c 20 79 6f 75 20 6c | 65 66 74 20 6f 66 66 20 |o, you l|eft off |
|00000530| 74 68 65 20 73 65 6d 69 | 63 6f 6c 6f 6e 20 61 66 |the semi|colon af|
|00000540| 74 65 72 20 74 68 65 20 | 77 68 69 6c 65 20 28 29 |ter the |while ()|
|00000550| 2e 0a 0a 2f 2a 2a 4a 61 | 6d 65 73 20 52 6f 62 69 |.../**Ja|mes Robi|
|00000560| 6e 73 6f 6e 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |nson****|********|
|00000570| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 20 20 20 20 20 |********|*** |
|00000580| 20 20 20 20 20 20 20 0a | 20 20 22 49 66 20 61 20 | .| "If a |
|00000590| 66 61 74 61 6c 20 65 72 | 72 6f 72 20 6f 63 63 75 |fatal er|ror occu|
|000005a0| 72 73 2c 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |rs, the |program |
|000005b0| 73 68 6f 75 6c 64 20 6e | 6f 74 20 62 65 20 61 6c |should n|ot be al|
|000005c0| 6c 6f 77 65 64 20 74 6f | 20 63 6f 6e 74 69 6e 75 |lowed to| continu|
|000005d0| 65 2e 22 0a 20 2d 2d 20 | 4f 72 61 63 6c 65 20 50 |e.". -- |Oracle P|
|000005e0| 72 6f 2a 43 20 55 73 65 | 72 27 73 20 47 75 69 64 |ro*C Use|r's Guid|
|000005f0| 65 20 20 20 20 20 20 20 | 20 20 2a 2a 2a 2a 2a 2a |e | ******|
|00000600| 2a 2a 2a 2a 2a 2a 2a 6a | 61 6d 65 73 2d 72 6f 62 |*******j|ames-rob|
|00000610| 69 6e 73 6f 6e 40 75 69 | 6f 77 61 2e 65 64 75 2a |inson@ui|owa.edu*|
|00000620| 2a 2f 0a | |*/. | |
+--------+-------------------------+-------------------------+--------+--------+